package zhh.check.impl;

import zhh.check.CheckHandler;
import zhh.person.Person;

public class WeightCheck extends CheckHandler {
    public WeightCheck() {
    }

    public WeightCheck(CheckHandler nextHandler) {
        super(nextHandler);
    }

    @Override
    public boolean check(Person person) {
        if (person.getWeight() <= 50) {
            return false;
        }
        System.out.println("体重正常");
        if (nextHandler != null) {
            return nextHandler.check(person);
        }
        return true;
    }
}
